@include('admin.public.head')

<style type="text/css">
    .inner_btn {
        background: #19a97b;
        color: white;
        padding: 5px 8px;
        border-radius: 2px;
    }
</style>

<div class="ibox-title">
    <h5>時間管理</h5>
</div>

<div class="ibox-content">

    <div class="row">
        <div class="col-sm-12 clear">
            <div class="" style="margin: 0px 10px">
                <a href="/time_add" class="btn btn-w-m btn-primary">新增</a>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-sm-12 pull-right m-b-xs">
            <form action="">
                <div class="col-sm-1  m-b-xs text-center pull-right">
                    <button type="submit" class="btn btn-sm btn-primary">搜索</button> </span>
                </div>

                @include('admin.public.class_base_time.where_week_select')

            </form>
        </div>
    </div>

    <table class="table table-bordered">
        <thead>
            <tr>
                <th>周期</th>
                <th>開始時間</th>
                <th>結束時間</th>
                <th>时长</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
        @foreach ($result as $v)
            <tr>
                <td>{{$v->week}}</td>
                <td>{{$v->time_start}}</td>
                <td>{{$v->time_end}}</td>
                <td>{{$v->duration}}</td>
                <td>
                    <div class="btn-group">
                        <a  class="btn btn-primary btn-sm dropdown-toggle" href="/time_edit/{{$v->id}}">編輯
                        </a>&nbsp;&nbsp;
                    </div>
                </td>
            </tr>
        @endforeach
        </tbody>
        {{ $result->appends(Request::except ('page'))->links() }}
    </table>
    {{ $result->appends(Request::except ('page'))->links() }}
</div>

